module.exports = function (Sequelize, sequelize) {
    const {STRING, INTEGER, DATE} = Sequelize
    return sequelize.define('photo_album_item', {
        id: {
            type: INTEGER,
            primaryKey: true,
            autoIncrement: true,
            comment: "id",
        },
        group_id: {
            type: INTEGER,
            allowNull: true,
            comment: "分组id",
        },
        cate_id: {
            type: INTEGER,
            allowNull: true,
            comment: "分类id",
        } ,
        name: {
            type: STRING,
            allowNull: true,
            comment: "名称",
        },
        url: {
            type: STRING,
            allowNull: true,
            comment: "地址",
        },
        base64: {
            type: STRING,
            allowNull: true,
            comment: "base64",
        },
        create_time: {
            type: DATE,
            defaultValue: new Date(),
            allowNull: true,
            comment: "创建时间",
        },

    }, {
        //使用自定义表名
        freezeTableName: true,
        //去掉默认的添加时间和更新时间
        timestamps: false,
    })
}
